﻿using DocumentFormat.OpenXml.Lite.Shared;
using DocumentFormat.OpenXml.Lite.SpreadsheetML.Excel.WorksheetElements;
using DocumentFormat.OpenXml.Lite.Xml;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;

namespace DocumentFormat.OpenXml.Lite.SpreadsheetML.Excel.Shared
{
    [XmlRoot("si", Namespace = Constants.ExcelMain)]
    public class StringItem : XmlSerializable
    {
        [Optional]
        [XmlElement("t", Namespace = Constants.ExcelMain)]
        public SimpleText Text { get; set; }

        [Optional]
        [XmlElement("r", Namespace = Constants.ExcelMain)]
        public XmlList<RichTextRun> Runs { get; set; }

        [Optional]
        [XmlElement("rPh", Namespace = Constants.ExcelMain)]
        public XmlList<PhoneticRun> PhoneticRuns { get; set; }

        [Optional]
        [XmlElement("phoneticPr", Namespace = Constants.ExcelMain)]
        public PhoneticProperty PhoneticProperty { get; set; }

        public StringItem()
        {
            Runs = new XmlList<RichTextRun>();
            PhoneticRuns = new XmlList<PhoneticRun>();
        }
    }
}
